package com.im.common.constant;

/**
 * 常量相关定义
 *
 * @author yunZhouJiaDi
 */
public class Constant {

    public static class SystemConstant {
        public static final String SUBJECT = "YunZhou-IM 验证码";
        public static final String SUBJECT_CONTENT = "【验证码】您的验证码为:%s，验证码五分钟内有效，逾期作废";
        public static final String USER_PREFIX = "U";
        public static final int ERROR_COUNT = 3;
        public static final String USER_LOCK_CONTENT = "您的密码已错误%d次，现已被锁定，请%s分钟后再尝试";
        public static final String USER_REST_CONTENT = "密码错误，总登录次数%d次，剩余次数%d";
        public static final String USER_LOCK_REST_CONTENT = "账号锁定中，还没到允许登录的时间，请%s分钟后再尝试";
        public static final String APPLY_INFO_TEMPLATE = "我是%s";
        public static final long MAX_FILE_SIZE = 150 * 1024 * 1024;
        public static final String CLUSTER_PREFIX = "G";
        public static final String CREATE_CLUSTER_SUCCESS = "群组已经创建好，可以和好友一起畅聊了";
        public static final String ADD_CLUSTER = "%s加入了群组";
        public static final String EXIT_CLUSTER_CONTENT = "%s已退出群组";
        public static final String CANCEL_CLUSTER_CONTENT = "群组已解散";
        public static final String KICK_CLUSTER = "%s踢出了群组";
        public static final Long MILLISECOND_SEVEN_DAYS_AGO = 7 * 24 * 60 * 60 * 1000L;

    }

    public static class RedisConstant {
        public final static String EMAIL_CODE = "emailCode:";
        public final static String CAPTCHA_CODE_KEY = "captchaCode:";
        public final static String ERROR_COUNT = "errorCount:";
        public final static String USER = "user:";
        public final static String USER_CONTACT = "userContact:";
        public final static String CLUSTER = "cluster:";
        public final static String CLUSTER_USER = "clusterUser:";
        public final static String USER_HEART_BEAT = "userHeartBeat:";
        public static final String MQ_SEND_MESSAGE = "mqSendMessage:";
        public static final String MESSAGE_DEDUPLICATION = "messageDeduplication:";
        public static final String READ_CHAT_MESSAGE = "readChatMessage:";
        public static final String DELETE_CHAT = "deleteChat:";
        public static final String CLEAR_CHAT = "clearChat:";
    }

    public static class RabbitmqConstant {
        public static final String EXCHANGE_MESSAGE = "im_exchange_message";
        public static final String QUEUE_SYS_MESSAGE = "im_queue_sys_message";
        public static final String ROUTING_KEY = "im.msg.*";
        public static final String SEND_MESSAGE = "sendMessage";
        public static final String UPDATE_MESSAGE = "updateMessage";
        public static final String SAVE_MESSAGE = "saveMessage";
    }

}
